<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout" layout:decorate="~{layout/storelayout}" >
<head>
    <title>会员管理系统</title>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link th:href="@{/static/layui/css/layui.css}" rel="stylesheet" />
    <link rel="icon" href="../img/favicon.ico" type="image/x-icon" />
    <script th:src="@{/static/layui/layui.js}" type="text/javascript"></script>
</head>
<body>
<!-- 会员注册页面  -->
<!-- 会员注册页面  -->
<!-- 会员注册页面  -->
<div class="login-main">
    <div layout:fragment="content">

        <!-- 表单选项 -->
        <form th:action="@{/storeActivity/addActivity}" class="layui-form">

            <!-- 手机号 -->
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label layui-bg-white">活动内容：</label>
                    <div class="layui-input-inline">
                        <input type="text" id="content" name="content" required  lay-verify="required" placeholder="请输入活动内容" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <!-- 对号 -->
                <div class="layui-inline">
                    <i class="layui-icon" id="iri" style="color: green;font-weight: bolder;" hidden></i>
                </div>
                <!-- 错号 -->
                <div class="layui-inline">
                    <i class="layui-icon" id="iwr" style="color: red; font-weight: bolder;" hidden></i>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label layui-bg-white">起始日期：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="start" required  lay-verify="required" id="date1" autocomplete="off" class="layui-input" >
                    </div>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label layui-bg-white">结束日期：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="stop" required  lay-verify="required" id="date2" autocomplete="off" class="layui-input" >
                    </div>
                </div>
            </div>

<!--            获取session域中的商家id-->
            <input type="text" name="storeId" th:value="${session.storeManage.id}" hidden/>

            <div class="layui-input-inline login-btn" style="width: 85%">
                <button type="submit" lay-submit lay-filter="sub" class="layui-btn layui-btn-primary">添加</button>
            </div>
        </form>



        <script src="/static/layui/layui.js"></script>
        <script type="text/javascript">
            layui.use(['form','jquery','layer','laydate'], function () {
                var form   = layui.form ;
                var laydate = layui.laydate;
                var $      = layui.jquery;
                var layer  = layui.layer;

                //日期
                laydate.render({
                    elem: '#date'
                });
                laydate.render({
                    elem: '#date1'
                });
                laydate.render({
                    elem: '#date2'
                });

            });

        </script>
    </div>
</div>
</body>
</html>